package Client;

import Model.Payload;
import Model.Queue;


public class ThreadClientServer extends Thread{
	private PayloadClientServer server;
	private Queue queue;
	
	public ThreadClientServer(PayloadClientServer server, Queue queue) {
		this.server = server;
		this.queue = queue;
	}
	
	@Override
	public void run() {
		while (true) {
			Payload payload = server.readPayloadObject();
			queue.setState(payload.getId(), payload.getState());
		}
	}

}